
%-------------------------------------------------------------------------------
\newpage
\subsection{{\sf GxB\_IndexBinaryOp} Options}
\label{get_set_idxbinop}
%-------------------------------------------------------------------------------

\begin{mdframed}[userdefinedwidth=6in]
{\footnotesize
\begin{verbatim}
GrB_Info GrB_get (GxB_IndexBinaryOp op, GrB_Scalar value, int f) ;
GrB_Info GrB_get (GxB_IndexBinaryOp op, char *     value, int f) ;
GrB_Info GrB_get (GxB_IndexBinaryOp op, int32_t *  value, int f) ;
GrB_Info GrB_get (GxB_IndexBinaryOp op, size_t *   value, int f) ;

GrB_Info GrB_set (GxB_IndexBinaryOp op, char *     value, int f) ;
\end{verbatim}
}\end{mdframed}

\noindent
{\small
\begin{tabular}{|l|l|l|p{2.8in}|}
\hline
\verb'int field'                    & R/W  & C type        & description \\
\hline
\verb'GrB_INP0_TYPE_CODE'          & R    & \verb'int32_t'& 1st input type code (see \verb'GrB_Type_code') \\
\verb'GrB_INP1_TYPE_CODE'          & R    & \verb'int32_t'& 2nd input type code \\
\verb'GrB_OUTP_TYPE_CODE'          & R    & \verb'int32_t'& output type code \\
\verb'GxB_THETA_TYPE_CODE'         & R    & \verb'int32_t'& $\Theta$ type code \\
\verb'GrB_INP0_TYPE_STRING'        & R    & \verb'char *' & name of the 1st input type \\
\verb'GrB_INP1_TYPE_STRING'        & R    & \verb'char *' & name of the 2nd input type \\
\verb'GrB_OUTP_TYPE_STRING'        & R    & \verb'char *' & name of the output type \\
\verb'GxB_THETA_TYPE_STRING'       & R    & \verb'char *' & name of the $\Theta$ type \\
\hline
\verb'GrB_NAME'                     & R/W1 & \verb'char *' &    % GrB_ALREADY_SET (binop)
    name of the operator.
    For user-defined operators, the name can be any string of any length.  It
    is not used by the JIT.  It can be set at most once. \\
\verb'GxB_JIT_C_NAME'               & R/W1 & \verb'char *' &
    This must be a valid name of a C function to enable its use in the JIT.
    The length of the name can be at most \verb'GxB_MAX_NAME_LEN', including
    the \verb'nul' terminating byte.  It can be set at most once. \\
\verb'GxB_JIT_C_DEFINITION'         & R/W1 & \verb'char *' &
    definition for a user-defined operator, as a C function; built-in operators
    return an empty string.  It can be set at most once. \\
\hline
\end{tabular}
}

There are no built-in index-binary operators, but if there are in the future,
they will not be be modified by \verb'GrB_set'.  User-defined operators can be
used without setting their name or definition, but they can be used in JIT
kernels only when both the JIT C name and the definition are set.

To use the JIT, all semirings that access this index-binary operator must
be defined after the user-defined operator has been given both a name and a
definition.  GraphBLAS can use a semiring that uses a binary operator
without a name, but it cannot use the JIT, even if the operator is given a name
later on after the operator is created.

